package minio

import (
	"context"
	"github.com/minio/minio-go/v7"
	"go-process/config"
)

type BucketUtils struct {
	MinIOClient *config.MinIO
}

func (bucker *BucketUtils) BuckerExists(ctx context.Context, bucketName string) (bool, error) {
	return config.MinIoClient.BucketExists(ctx, bucketName)
}

func (bucker *BucketUtils) CreateBucket(ctx context.Context, bucketName string) error {
	return config.MinIoClient.MakeBucket(ctx, bucketName, minio.MakeBucketOptions{Region: bucketName})
}
